﻿<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="Links" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xe="http://www.CrossFactory.net/XmlEditor">
  <xs:complexType name="links" mixed="false">
    <xs:sequence minOccurs="1" maxOccurs="1">
      <xs:element name="imagepos" type="imagepos" default="left" minOccurs="1" maxOccurs="1" xe:property="true" />
      <xs:group ref="linksgroup" maxOccurs="unbounded" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="imagepos">
    <xs:restriction base="xs:string">
      <xs:enumeration value="left" />
      <xs:enumeration value="right" />
    </xs:restriction>
  </xs:simpleType>
  <xs:group name="linksgroup">
    <xs:choice>
      <xs:element name="link" type="link" />
    </xs:choice>
  </xs:group>
  <xs:complexType name="link" mixed="false">
    <xs:sequence>
      <xs:element name="linklabel" type="text" minOccurs="1" maxOccurs="1" default="link" xe:property="true" />
      <xs:element name="href" type="text" maxOccurs="1" minOccurs="1" xe:property="true" xe:openPropertiesOnCreation="true" xe:hyperlinkType="www,page" />
      <xs:element name="linkanchor" type="text" minOccurs="1" maxOccurs="1" xe:property="true" />
      <xs:element name="tooltip" type="text" maxOccurs="1" minOccurs="1" xe:property="true" />
      <xs:element name="target" type="openin" maxOccurs="1" minOccurs="1" xe:property="true"  default="_parent" />
      <xs:element name="picture" type="picture" maxOccurs="1" minOccurs="0" xe:property="true"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="hyperlink" mixed="true">
    <xs:sequence>
      <xs:element name="href" type="text" maxOccurs="1" minOccurs="1" />
      <xs:element name="linkanchor" type="text" minOccurs="1" maxOccurs="1" xe:property="true" />
      <xs:element name="tooltip" type="text" maxOccurs="1" minOccurs="1" />
      <xs:element name="target" type="openin" maxOccurs="1" minOccurs="1" default="_parent"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="picture" mixed="false">
    <xs:sequence>
      <xs:element name="uri" type="text" maxOccurs="1" minOccurs="1" xe:property="true" xe:openPropertiesOnCreation="true" xe:hyperlinkType="localImage" />
      <xs:element name="width" type="size" default="25" maxOccurs="1" minOccurs="1" xe:property="true" />
      <xs:element name="height" type="size" maxOccurs="1" minOccurs="1" xe:property="true" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="links" type="links"></xs:element>
</xs:schema>